#ifndef MF_CONSTANTS_H
#define MF_CONSTANTS_H

#import "mfTouchApp.h"

//-------------------------------
#define OF_VERSION		("MF_0.01")
#define MF_VERSION		0001
//-------------------------------

// include open gl
#import <OpenGLES/ES1/gl.h>
#import <OpenGLES/ES1/glext.h>

// include basics and std things (I'm adding more here as we use them)
#include <math.h>
#include <time.h>
#include <stdlib.h>
#include <assert.h>
#include <mach/mach.h>
#include <mach/mach_time.h>
#include <unistd.h>

#include <string>
#include <sstream>  //for ostringsream
#include <iomanip>  //for setprecision
using namespace std;

// math
#ifndef PI
#define PI       3.14159265358979323846
#endif

#ifndef TWO_PI
#define TWO_PI   6.28318530717958647693
#endif

#ifndef M_TWO_PI
#define M_TWO_PI   6.28318530717958647693
#endif

#ifndef FOUR_PI
#define FOUR_PI 12.56637061435917295385
#endif

#ifndef HALF_PI
#define HALF_PI  1.57079632679489661923
#endif

#ifndef DEG_TO_RAD
#define DEG_TO_RAD (PI/180.0)
#endif

#ifndef RAD_TO_DEG
#define RAD_TO_DEG (180.0/PI)
#endif

#ifndef MIN
#define MIN(x,y) (((x) < (y)) ? (x) : (y))
#endif

#ifndef MAX
#define MAX(x,y) (((x) > (y)) ? (x) : (y))
#endif

#ifndef CLAMP
#define CLAMP(val,min,max) (MAX(MIN(val,max),min))
#endif

#ifndef ABS
#define ABS(x) (((x) < 0) ? -(x) : (x))
#endif


// maximum number of fingers that can be on the screen at once
#define MF_MAX_TOUCHES 5

// screen orientation
#define		MF_PORTRAIT				0
#define		MF_LANDSCAPE			1

// how we draw rectangles
#define 	OF_RECTMODE_CORNER		0
#define 	OF_RECTMODE_CENTER		1

// fill or outline shapes we draw?
#define 	OF_FILLED				0x01
#define 	OF_OUTLINE				0x02

// image type
#define		OF_IMAGE_GRAYSCALE		0x00
#define		OF_IMAGE_COLOR			0x01
#define		OF_IMAGE_COLOR_ALPHA	0x02
#define		OF_IMAGE_UNDEFINED		0x03


// core types borrowed from openFrameworks
class ofPoint {
public: 
    float x; 
    float y; 
    float z; 
    
    ofPoint( float _x=0.0f, float _y=0.0f, float _z=0.0f ) { 
        x = _x; 
        y = _y; 
        z = _z; 
    } 
}; 

class ofRectangle {
public: 
	float x; 
	float y; 
	float width; 
	float height;    
};

#endif